﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Admin.Migrations
{
    public partial class initial12 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_NegativeMenus_MenuId",
                table: "NegativeMenus",
                column: "MenuId");

            migrationBuilder.AddForeignKey(
                name: "FK_NegativeMenus_Menus_MenuId",
                table: "NegativeMenus",
                column: "MenuId",
                principalTable: "Menus",
                principalColumn: "MenuId",
                onDelete: ReferentialAction.Cascade);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_NegativeMenus_Menus_MenuId",
                table: "NegativeMenus");

            migrationBuilder.DropIndex(
                name: "IX_NegativeMenus_MenuId",
                table: "NegativeMenus");
        }
    }
}
